local t = Def.ActorFrame {};
local ex2 = GAMESTATE:IsExtraStage2();
local exget = GAMESTATE:HasEarnedExtraStage();
local fail = STATSMAN:GetCurStageStats():AllFailed();

t[#t+1] = Def.Quad{
	InitCommand=cmd(FullScreen;diffuse,color("0,0,0,0"));
	OnCommand=cmd(sleep,1;linear,1;diffusealpha,1);
};	
t[#t+1] = LoadActor("_open")..{
	OnCommand=function(self) self:sleep(1.2):queuecommand("Play") end;
	PlayCommand=function(self) self:play() end;
};
t[#t+1] = LoadActor("_close")..{
	OnCommand=function(self) self:sleep(5.4):queuecommand("Play") end;
	PlayCommand=function(self) self:play() end;
};
t[#t+1] = LoadActor("_grid") .. {
	InitCommand=function(self) self:Center():y(20):diffusealpha(0):zoomx(1):zoomy(1) end;
	OnCommand=function(self) self:sleep(1):linear(1):diffusealpha(0.5):queuecommand("Scroll") end;
	ScrollCommand=function(self) self:y(20):linear(2):addy(50):queuecommand("Scroll2") end;
	Scroll2Command=function(self) self:y(20):linear(2):addy(50) end;
};
t[#t+1] = LoadActor("_prompt")..{
	InitCommand=function(self) self:Center():zoom(0) end;
	OnCommand=function(self) self:sleep(1.3):linear(0.2):zoomx(0.8):zoomy(0.05):decelerate(0.3):zoomy(0.8):sleep(3.7):linear(0.3):zoomx(3):zoomy(0)		end;
};

if ex2 and not fail then
	t[#t+1] = LoadActor("_allclear")..{
		OnCommand=function(self) self:sleep(1.7):queuecommand("Play") end;
		PlayCommand=function(self) self:play() end;
	};
	t[#t+1] = LoadActor("_acblip")..{
		OnCommand=function(self) self:sleep(2.5):queuecommand("Play"):sleep(0.6):queuecommand("Play"):sleep(0.6):queuecommand("Play"):sleep(0.6):queuecommand("Play"):sleep(0.6):queuecommand("Play") end;
		PlayCommand=function(self) self:play() end;
	};
	t[#t+1] = LoadActor("_actext")..{
			InitCommand=function(self) self:Center():zoom(0.8):diffusealpha(0) end;
			OnCommand=function(self) self:sleep(2.6):queuecommand("SlowBlink"):queuecommand("SlowBlink"):queuecommand("SlowBlink"):queuecommand("SlowBlink"):queuecommand("SlowBlink") end;
			SlowBlinkCommand=function(self) self:diffusealpha(1):sleep(0.3):diffusealpha(0):sleep(0.3) end;
	};
else
	t[#t+1] = LoadActor("_stageclear")..{
		OnCommand=function(self) self:sleep(1.7):queuecommand("Play") end;
		PlayCommand=function(self) self:play() end;
	};
	t[#t+1] = LoadActor("_typing")..{
		OnCommand=function(self) self:sleep(2.75):queuecommand("Play") end;
		PlayCommand=function(self) self:play() end;
	};
	t[#t+1] = Def.ActorFrame {
		OnCommand=function(self) self:sleep(5.5):linear(0.2):diffusealpha(0) end;
		LoadActor("_typeC")..{
			InitCommand=function(self) self:Center():zoom(0.8):addx(-150):diffusealpha(0) end;
			OnCommand=function(self) self:sleep(2.85):diffusealpha(1) end;
		};
		LoadActor("_typeL")..{
			InitCommand=function(self) self:Center():zoom(0.8):addx(-100):diffusealpha(0) end;
			OnCommand=function(self) self:sleep(2.93):diffusealpha(1) end;
		};
		LoadActor("_typeE")..{
			InitCommand=function(self) self:Center():zoom(0.8):addx(-50):diffusealpha(0) end;
			OnCommand=function(self) self:sleep(3.01):diffusealpha(1) end;
		};
		LoadActor("_typeA")..{
			InitCommand=function(self) self:Center():zoom(0.8):diffusealpha(0) end;
			OnCommand=function(self) self:sleep(3.09):diffusealpha(1) end;
		};
		LoadActor("_typeR")..{
			InitCommand=function(self) self:Center():zoom(0.8):addx(50):diffusealpha(0) end;
			OnCommand=function(self) self:sleep(3.17):diffusealpha(1) end;
		};
		LoadActor("_typeE")..{
			InitCommand=function(self) self:Center():zoom(0.8):addx(100):diffusealpha(0) end;
			OnCommand=function(self) self:sleep(3.25):diffusealpha(1) end;
		};
		LoadActor("_typeD")..{
			InitCommand=function(self) self:Center():zoom(0.8):addx(150):diffusealpha(0) end;
			OnCommand=function(self) self:sleep(3.33):diffusealpha(1) end;
		};
	};
end
return t;